package lesson13;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @author tongchen
 * @create 2023-02-12 21:59
 */
public class exer03 {
    public static void main(String[] args) throws IOException {
        //创建文件输出流
        FileOutputStream fileOutputStream = new FileOutputStream("D:\\360安全浏览器下载\\test\\aa\\bb\\test.txt");
        PrintWriter printWriter = new PrintWriter(fileOutputStream);
        //每次读入一个二进制文件
        fileOutputStream.write(69);
        fileOutputStream.write(70);
        fileOutputStream.write(71);
        //一定要注意的是：我们在写入时会将原来的数据全部清除
        printWriter.println("hdsjhdak");
        printWriter.println("死锁");
        fileOutputStream.flush();
        printWriter.flush();
        printWriter.close();
        fileOutputStream.close();
    }
}
